/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package patterns.abstractfactory;

import patterns.factory2.Animal;
import patterns.factory2.Cat;
import patterns.factory2.Dog;

/**
 *
 * @author Zeus
 */
public class MammalFactory extends SpeciesFactory {

    @Override
    public Animal getAnimal(String type) {
        if (type.equalsIgnoreCase("dog")) {
            return new Dog();
        }
        else{
            return new Cat();
        }
    }
}
